#include <iostream>

class Person
{
public:
    void set_name(std::string name)
    {
        this->name = name;
    }

    std::string get_name()
    {
        return this->name;
    }

    void set_age(int age)
    {
        if (age < 0 || age > 120)
        {
            std::cout << "你个老妖精!!" << std::endl;
            return;
        }
        this->age = age;
    }

    static int get()
    {
        return 1;
    }

    int get_age()
    {
        return this->age;
    }

    void set_lover(std::string name)
    {
        this->lover_name = name;
    }

    void show_info()
    {
        std::cout << "姓名：" << this->name << "\t年龄：" << this->age << "\t情人：" << this->lover_name << std::endl;
    }

private:
    std::string name;
    int age;
    std::string lover_name;
};

int main(int argc, char const *argv[])
{
    Person person;
    person.set_name("张三");
    std::cout << person.get_name() << std::endl;

    person.set_age(100) ;
    std::cout << person.get_age() << std::endl;

    person.set_lover("大明星");
    // std::cout << person.lover_name << std::endl; // member "Person::lover_name" is inaccessible
    person.show_info();
    return 0;
}
